﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ICM_Item_Request_Dtls.aspx.cs" Inherits="KPIS.GERP.GIMS.APP.APP_UI.Form.ICM_Item_Request_Dtls" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" tagprefix="telerik" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>รายละเอียดการขอเบิกพัสดุ</title>
    
       <LINK REL="StyleSheet" HREF="../../Styles/StyleSheet.css" TYPE="text/css">  
    
    <style type="text/css">
        .style1
        {
            width: 156px;
        }
    
.RadGrid_Outlook
{
    font:12px/16px "segoe ui",arial,sans-serif;
}

.RadGrid_Outlook
{
    border:1px solid #002d96;
    background:#fff;
    color:#000;
}

.RadGrid_Outlook
{
    font:12px/16px "segoe ui",arial,sans-serif;
}

.RadGrid_Outlook
{
    border:1px solid #002d96;
    background:#fff;
    color:#000;
}

.RadGrid_Outlook .rgMasterTable
{
    border-collapse:separate;
}

.RadGrid_Outlook .rgMasterTable
{
    font:12px/16px "segoe ui",arial,sans-serif;
}

.RadGrid_Outlook .rgMasterTable
{
    border-collapse:separate;
}

.RadGrid_Outlook .rgMasterTable
{
    font:12px/16px "segoe ui",arial,sans-serif;
}

.RadGrid_Outlook .rgHeader
{
    color:#000;
    text-decoration:none;
}

.RadGrid_Outlook .rgHeader
{
	border:0;
	border-left:1px solid #89aee5;
	border-bottom:1px solid #5d8cc9;
	padding-top:5px;
	padding-bottom:4px;
	background:0 -2300px repeat-x #7da5e0 url('mvwres://Telerik.Web.UI, Version=2009.1.311.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4/Telerik.Web.UI.Skins.Outlook.Grid.sprite.gif');
	text-align:left;
	font-weight:normal;
}

.RadGrid_Outlook .rgHeader
{
	padding-left:7px;
	padding-right:7px;
}

.RadGrid_Outlook .rgHeader
{
	cursor:default;
}

.RadGrid_Outlook .rgHeader
{
    color:#000;
    text-decoration:none;
}

.RadGrid_Outlook .rgHeader
{
	border:0;
	border-left:1px solid #89aee5;
	border-bottom:1px solid #5d8cc9;
	padding-top:5px;
	padding-bottom:4px;
	background:0 -2300px repeat-x #7da5e0 url('mvwres://Telerik.Web.UI, Version=2009.1.311.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4/Telerik.Web.UI.Skins.Outlook.Grid.sprite.gif');
	text-align:left;
	font-weight:normal;
}

.RadGrid_Outlook .rgHeader
{
	padding-left:7px;
	padding-right:7px;
}

.RadGrid_Outlook .rgHeader
{
	cursor:default;
}

.RadGrid_Outlook .rgHeader input
{
	vertical-align:middle;
}

.RadGrid_Outlook .rgHeader input
{
	vertical-align:middle;
}

.RadGrid_Outlook .rgFilterRow input
{
	vertical-align:middle;
}

.RadGrid_Outlook .rgFilterRow input
{
	vertical-align:middle;
}

.RadGrid_Outlook .rgFilterBox
{
	border:1px solid #c3d9f9;
	padding:2px 1px 3px;
	font:12px "segoe ui",arial,sans-serif;
	color:#000;
	vertical-align:middle;
}

.RadGrid_Outlook .rgFilterBox
{
	border:1px solid #c3d9f9;
	padding:2px 1px 3px;
	font:12px "segoe ui",arial,sans-serif;
	color:#000;
	vertical-align:middle;
}

    </style>
    
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <div>
 
<script type="text/javascript">   

      
          function onTextChange(sender) 
           {
               if (sender.get_value() == "")
                     {
                        sender.set_text("");
                    }
          } 
          
</script>
      
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid2">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid2" 
                        LoadingPanelID="RadAjaxLoadingPanel2" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

       <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel2" runat="server">
    </telerik:RadAjaxLoadingPanel>
    
    <link href="../CssClass.css" rel="stylesheet" type="text/css" /> 
    
      <asp:panel ID="Panel6" runat="server" >
    <table width="780" cellpadding="0" cellspacing="0">
    
    <tr>
    <td>
    
    
        <div class="bigModulePaneFull">
            <div class="bigModuleBottomPaneFull">
                         <asp:Panel ID="PanelFilter" runat="server" Width="900px" >
                            <table align = "center" width = "900px">
                                    <tr>
                                        <td align="right" >
                                        <asp:Label ID="Label1" runat="server" Text="วันที่ทำรายการ :"></asp:Label>
                                         </td>
                                        <td align="left" class="style1">
                                        <asp:Label ID="lblReqDate" runat="server" Text=""></asp:Label>
                                         </td>
                                         <td>
                                         </td>
                                       <td align="right">
                                           &nbsp;</td>
                                       <td align="left">
                                           &nbsp;</td>
                                    </tr>
                                    <tr>
                                        <td align="right" >
                                            <asp:Label ID="Label5" runat="server" Text="เลขที่ใบเบิก :"></asp:Label>
                                         </td>
                                        <td align="left" class="style1">
                                            <asp:Label ID="lblReqCode" runat="server" Text=""></asp:Label>
                                         </td>
                                       <td align="right">
                                         </td>
                                       <td align="right">
                                           <asp:Label ID="Label3" runat="server" Text="ประเภท :"></asp:Label>
                                         </td>
                                        <td>
                                            <asp:Label ID="lblInvType" runat="server" Text=""></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right" >
                                            <asp:Label ID="Label6" runat="server" Text="หน่วยงานที่ขอเบิก :"></asp:Label>
                                         </td>
                                        <td align="left" class="style1">
                                            <asp:Label ID="lblJobsite" runat="server" Text=""></asp:Label>
                                         </td>
                                       <td align="right">
                                         </td>
                                       <td align="left">
                                         </td>
                                        <td>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right" >
                                            <asp:Label ID="Label7" runat="server" Text="เรื่อง :"></asp:Label>
                                         </td>
                                        <td align="left" class="style1">
                                            <asp:Label ID="lblReqName" runat="server" Text=""></asp:Label>
                                         </td>
                                       <td align="right">
                                         </td>
                                       <td align="left">
                                         </td>
                                        <td>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right" >
                                            <asp:Label ID="Label8" runat="server" Text="หมายเหตุ :"></asp:Label>
                                         </td>
                                        <td align="left" colspan="4">
                                            <asp:Label ID="lblRemarks" runat="server" Text=""></asp:Label>
                                         </td>
                                    </tr>
                                    <tr>
                                        <td align="right" >
                                            <asp:Label ID="Label9" runat="server" Text="เบิกพัสดุจากคลัง :"></asp:Label>
                                         </td>
                                        <td align="left" class="style1">
                                            <asp:Label ID="lblFromWH" runat="server" Text=""></asp:Label>
                                         </td>
                                       <td align="right">
                                         </td>
                                       <td align="left">
                                         </td>
                                        <td>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right" >
                                            <asp:Label ID="Label10" runat="server" Text="สถานะ :"></asp:Label>
                                         </td>
                                        <td align="left" class="style1">
                                            <asp:Label ID="lblStatus" runat="server" Text=""></asp:Label>
                                         </td>
                                       <td align="right">
                                         </td>
                                       <td align =right >
                                           <asp:Label ID="Label11" runat="server" Text="วันที่ต้องการพัสดุ :"></asp:Label>
                                         </td>
                                        <td>
                                            <asp:Label ID="lblDateWanted" runat="server" Text=""></asp:Label>
                                        </td>
                                    </tr>
                                </table>
                        </asp:Panel>
               <fieldset>
                                                                                                <legend>รายการพัสดุ</legend>
                                                                                            <table width="100%">
                                                                                                <tr>
                                                                                                    <td>
                                                                                                    <fieldset>
                                                                                                        <table>
                                                                                                            <tr>
                                                                                                                <td class="command-item" style="border: none">
                                                                                                                    <asp:LinkButton ID="btnAddItem" runat="server" CausesValidation="false" 
                                                                                                                    CssClass="LinkButton"> <img alt="" height="16px" 
                                                                                                                    src="../Image/Grid/AddRecord.gif" style="border:0px;vertical-align:middle;" 
                                                                                                                    width="16px" />&#160;&#160;เพิ่มรายการพัสดุ </asp:LinkButton> 
                                                                                                                </td>
                                                                                                                <td class="command-item">
                                                                                                                    <asp:LinkButton ID="btnDeleteItem" runat="server" CausesValidation="false" 
                                                                                                                    CssClass="LinkButton" OnClick="btnDeleteItem_Click" 
                                                                                                                    OnClientClick="javascript:return confirm('ยืนยันการลบรายการพัสดุที่เลือก')"> <img 
                                                                                                                    alt="" height="16px" src="../Image/Grid/Delete.gif" 
                                                                                                                    style="border:0px;vertical-align:middle;" width="16px" />&#160;&#160;ลบรายการพัสดุ </asp:LinkButton>
                                                                                                                </td>
                                                                                                            </tr>
                                                                                                        </table>
                                                                                                    </fieldset>
                                                                                                        <telerik:RadToolTip ID="TipAddItem" runat="server" Animation="Fade" 
                                                                                                            Height="200px" HideEvent="FromCode" IsClientID="false" ManualClose="true" 
                                                                                                            Modal="true" Position="MiddleRight" ShowEvent="OnClick" Skin="Telerik" 
                                                                                                            TargetControlID="btnAddItem" Width="400px">
                                                                                                            <table width="100%">
                                                                                                                <tr class="table-outlook-header">
                                                                                                                    <td>
                                                                                                                        <asp:Label ID="lblTipHeader" runat="server" Font-Bold="true" Font-Size="Small" 
                                                                                                                            ForeColor="White" Text="รายการพัสดุ"></asp:Label>
                                                                                                                    </td>
                                                                                                                </tr>
                                                                                                                <tr>
                                                                                                                    <td>
                                                                                                                        <telerik:RadTreeView ID="TreeItem" runat="server" CausesValidation="false" 
                                                                                                                            CheckBoxes="true" CssClass="TreeView" DataFieldID="Id" 
                                                                                                                            DataFieldParentID="Parent_id" DataTextField="Name" DataValueField="Id" 
                                                                                                                            Height="300px" OnNodeExpand="TreeItem_NodeExpand" Skin="Outlook" 
                                                                                                                            TriStateCheckBoxes="true" onnodeclick="TreeItem_NodeClick">
                                                                                                                            <collapseanimation duration="0" type="None" />
                                                                                                                            <expandanimation duration="0" type="None" />
                                                                                                                            <DataBindings>
                                                                                                                                <telerik:RadTreeNodeBinding ImageUrlField="Image_url" />
                                                                                                                            </DataBindings>
                                                                                                                        </telerik:RadTreeView>
                                                                                                                    </td>
                                                                                                                </tr>
                                                                                                                <tr>
                                                                                                                    <td align="center">
                                                                                                                        <br />
                                                                                                                        <asp:LinkButton ID="btnSelectItem" runat="server" CausesValidation="false" 
                                                                                                                            CssClass="button-next-background" onclick="btnSelectItem_Click" 
                                                                                                                            OnClientClick="javascript:return SelectItem();" Text="เลือกรายการ">
                                                                                                                        </asp:LinkButton>
                                                                                                                    </td>
                                                                                                                </tr>
                                                                                                            </table>
                                                                                                        </telerik:RadToolTip>
                                                                                                     </td>
                                                                                                  <tr>
                                                                                                    <td>
                                                                                                        <telerik:RadToolTipManager ID="TipEachItem" runat="server" Animation="None" 
                                                                                                            Height="450px" HideEvent="ManualClose" OnAjaxUpdate="OnAjaxUpdate" 
                                                                                                            Position="MiddleRight" ShowEvent="OnClick" Skin="Telerik" Width="450px">
                                                                                                        </telerik:RadToolTipManager>
                                                                                                    </td>
                                                                                                </tr>
                                                                                                <tr>
                                                                                                    <td>
                                                                                                        &nbsp;</td>
                                                                                                </tr>
                                                                                            </table>
                                                                                        </fieldset>
                   </div>
               </div> 
    
    </td>
    
    
    </tr>
    
    
    
          <tr>
          <td colspan = "3">
        <div class="bigModulePaneFull">
              <div class="bigModuleBottomPaneFull">
        <table align="center" width ="750px" >
        <tr>
            <td align="left" class="tableHeader">
                รายละเอียดการเบิกพัสดุ &nbsp;<asp:Label ID="lblFinanceName" runat="server" 
                                    Visible="True"></asp:Label> </td>
        </tr>
        </table>
        <table width ="780px" >
        <tr>
        <td align="center">
       
        
        <asp:Panel ID="PanelGrid" 
            runat="server" 
            Width="750px" 
            Height="350px" ScrollBars="Auto" Visible="True" >
                
                
                
                
            <telerik:RadGrid ID="Grid_Item" runat="server" AllowFilteringByColumn="true" 
                AllowMultiRowSelection="True" AllowPaging="false" AllowSorting="True" 
                AutoGenerateColumns="False" CssClass="RadGrid" EnableAJAX="True" 
                GridLines="None" OnItemCommand="Grid_Item_ItemCommand" 
                OnItemDataBound="Grid_Item_ItemDataBound" ShowFooter="true" 
                ShowStatusBar="false" Skin="Outlook" Width="95%">
                <mastertableview allowmulticolumnsorting="true" grouploadmode="Client" 
                    nomasterrecordstext="&lt;div align=center&gt;&lt;font color=gray&gt;&lt;i&gt;ไม่มีข้อมูล&lt;/i&gt;&lt;/font&gt;&lt;/div&gt;" 
                    width="100%">
                    <PagerStyle Mode="NextPrevNumericAndAdvanced" />
                    <Columns>
                        <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn">
                            <HeaderStyle HorizontalAlign="Center" Width="10px" />
                            <ItemStyle HorizontalAlign="Center" />
                        </telerik:GridClientSelectColumn>
                        <telerik:GridBoundColumn AutoPostBackOnFilter="true" 
                            CurrentFilterFunction="Contains" DataField="InfoSource.Name" 
                            FilterControlWidth="100%" Groupable="true" 
                            GroupByExpression="InfoSource.Name Group By InfoSource.Seq" 
                            HeaderText="แหล่งเงิน" ShowFilterIcon="false" UniqueName="InfoSource.Name" 
                            Visible="false">
                            <HeaderStyle HorizontalAlign="Center" Width="150px" />
                            <ItemStyle HorizontalAlign="Left" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn AutoPostBackOnFilter="true" 
                            CurrentFilterFunction="Contains" DataField="InfoExpense.Name" 
                            FilterControlWidth="100%" Groupable="true" 
                            GroupByExpression="InfoExpense.Name Group By InfoExpense.Seq" 
                            HeaderText="รายจ่าย" ShowFilterIcon="false" UniqueName="InfoExpense.Name" 
                            Visible="false">
                            <HeaderStyle HorizontalAlign="Center" Width="150px" />
                            <ItemStyle HorizontalAlign="Left" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn AutoPostBackOnFilter="true" 
                            CurrentFilterFunction="Contains" DataField="InfoRule.Name" 
                            FilterControlWidth="100%" Groupable="true" 
                            GroupByExpression="InfoRule.Name Group By InfoRule.Seq" 
                            HeaderText="ระเบียบการจัดหา" ShowFilterIcon="false" UniqueName="InfoRule.Name" 
                            Visible="false">
                            <HeaderStyle HorizontalAlign="Center" Width="150px" />
                            <ItemStyle HorizontalAlign="Left" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn AutoPostBackOnFilter="true" 
                            CurrentFilterFunction="Contains" DataField="InfoProOperExp.InfoProOper.Name" 
                            FilterControlWidth="100%" Groupable="true" 
                            GroupByExpression="InfoProOperExp.InfoProOper.Name Group By InfoProOperExp.InfoProOper.Seq" 
                            HeaderText="อนุมัติหลักการ" ShowFilterIcon="false" 
                            UniqueName="InfoProOperExp.InfoProOper.Name" Visible="false">
                            <HeaderStyle HorizontalAlign="Center" Width="150px" />
                            <ItemStyle HorizontalAlign="Left" />
                        </telerik:GridBoundColumn>
                        <%--<telerik:GridBoundColumn AutoPostBackOnFilter="true" 
                                                                            CurrentFilterFunction="Contains" DataField="Name" FilterControlWidth="100%" 
                                                                            HeaderStyle-HorizontalAlign="Center" HeaderText="รายการ" ShowFilterIcon="false" 
                                                                            SortExpression="Name" UniqueName="Name">
                                                                            <HeaderStyle HorizontalAlign="Center" Width="250px" />
                                                                            <ItemStyle HorizontalAlign="Left" />
                                                                        </telerik:GridBoundColumn>--%>
                        <telerik:GridTemplateColumn AutoPostBackOnFilter="true" 
                            CurrentFilterFunction="Contains" DataField="Name" FilterControlWidth="100%" 
                            HeaderText="รายการ" ShowFilterIcon="false" SortExpression="Name" 
                            UniqueName="Name">
                            <HeaderStyle HorizontalAlign="Center" Width="250px" />
                            <ItemStyle HorizontalAlign="Left" />
                            <ItemTemplate>
                                <asp:HyperLink ID="lkName" runat="server" NavigateUrl="#" 
                                    Text='<%# Eval("Name") %>'></asp:HyperLink>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridBoundColumn AutoPostBackOnFilter="true" 
                            CurrentFilterFunction="Contains" DataField="Descr" FilterControlWidth="100%" 
                            HeaderStyle-HorizontalAlign="Center" HeaderText="รายละเอียด" 
                            ShowFilterIcon="false" UniqueName="Descr">
                            <HeaderStyle HorizontalAlign="Center" />
                            <ItemStyle HorizontalAlign="Left" />
                            <FooterStyle HorizontalAlign="Right" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn AutoPostBackOnFilter="true" 
                            CurrentFilterFunction="Contains" DataField="Qty" DataFormatString="{0:N0}" 
                            FilterControlWidth="100%" HeaderStyle-HorizontalAlign="Center" 
                            HeaderText="จำนวน" ShowFilterIcon="false" UniqueName="Qty">
                            <HeaderStyle HorizontalAlign="Center" Width="50px" />
                            <ItemStyle HorizontalAlign="Left" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn AutoPostBackOnFilter="true" 
                            CurrentFilterFunction="Contains" DataField="InfoItem.InfoUnit.Name" 
                            FilterControlWidth="100%" HeaderStyle-HorizontalAlign="Center" 
                            HeaderText="หน่วย" ShowFilterIcon="false" UniqueName="InfoItem.InfoUnit.Name">
                            <HeaderStyle HorizontalAlign="Center" Width="30px" />
                            <ItemStyle HorizontalAlign="Left" />
                        </telerik:GridBoundColumn>
                        <telerik:GridTemplateColumn AutoPostBackOnFilter="true" 
                            CurrentFilterFunction="Contains" DataField="Price" FilterControlWidth="100%" 
                            HeaderText="ราคาประมาณการ&lt;br&gt;ต่อหน่วย(บาท)" ShowFilterIcon="false" 
                            UniqueName="Price">
                            <ItemTemplate>
                                <asp:Label ID="lblPrice" runat="server" Text='<%# Eval("Price", "{0:N2}") %>'> </asp:Label>
                            </ItemTemplate>
                            <HeaderStyle HorizontalAlign="Center" Width="120px" />
                            <ItemStyle HorizontalAlign="Right" />
                            <FooterStyle HorizontalAlign="Right" />
                            <FooterTemplate>
                                <asp:Label ID="lblTotalPrice" runat="server" CssClass="font-label" 
                                    Font-Bold="true" Width="100px"> </asp:Label>
                            </FooterTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridBoundColumn DataField="InfoItem.Seq" 
                            HeaderStyle-HorizontalAlign="Center" UniqueName="InfoItem.Seq" Visible="false">
                            <HeaderStyle HorizontalAlign="Center" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="InfoExpense.Seq" 
                            HeaderStyle-HorizontalAlign="Center" UniqueName="InfoExpense.Seq" 
                            Visible="false">
                            <HeaderStyle HorizontalAlign="Center" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="InfoSource.Seq" 
                            HeaderStyle-HorizontalAlign="Center" UniqueName="InfoSource.Seq" 
                            Visible="false">
                            <HeaderStyle HorizontalAlign="Center" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="InfoRule.Seq" 
                            HeaderStyle-HorizontalAlign="Center" UniqueName="InfoRule.Seq" Visible="false">
                            <HeaderStyle HorizontalAlign="Center" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="InfoProOperExp.InfoProOper.Seq" 
                            HeaderStyle-HorizontalAlign="Center" 
                            UniqueName="InfoProOperExp.InfoProOper.Seq" Visible="false">
                            <HeaderStyle HorizontalAlign="Center" />
                        </telerik:GridBoundColumn>
                    </Columns>
                </mastertableview>
                <clientsettings enablerowhoverstyle="true">
                    <selecting allowrowselect="True" />
                </clientsettings>
            </telerik:RadGrid>
                
                
                
                
            </asp:Panel>
                </td>
                </tr>
                </table>
                </div>
</div>
</td>
</tr>
</table>
</asp:panel>
    </div>
    </form>
</body>
</html>
